--
-- Author:      feilong
-- DateTime:    2019-10-23 17:19:33
-- Description: 节点起动入口
-- nodeserver 负责节点间消息转发,管理注册到此的节点


local skynet = require "skynet"
local sharedata = require("skynet.sharedata")

g.service_name = "main"

skynet.start(function()

	local server_config = dofile(skynet.getenv("server_config"))
	local node_info = server_config.node_info
	--skynet控制台
	skynet.uniqueservice("debug_console", node_info.debug_port)

	-- local service = skynet.uniqueservice("config/config_service")
	-- g.Message():callService(service, "start")
	-- print("___________main__2_")	
	-- local tb = {
	-- 	a = { 
	-- 		aa=1
	-- 	},
	-- 	b = {
	-- 		bb=2
	-- 	}
	-- }
	-- print("___________main__3_")
	-- g.Message():callService(service, "load", tb)

	-- local data = g.Cfg():getData("a")
	-- g.Log():debug(data)



	local service = skynet.uniqueservice("manager_service")	
	g.Message():callService(service, "start")

	-- g.Log():error("________333")

	-- skynet.newservice("console")

	skynet.exit()


end)

